<%@page contentType="text/html;charset=windows-1252"%>
<%@page pageEncoding="UTF-8"%>
<%@page import="gestores.administracion.GestorArticulo"%>
<%@page import="java.util.HashMap, java.util.ArrayList"%>

<%
    int filtro = 0;
    if (request.getParameter("_filtro") != null){
        filtro = Integer.parseInt((String)request.getParameter("_filtro"));
        ArrayList<HashMap> articulos = GestorArticulo.listarArticulos(filtro);        
    }

%>

<div align="center">
<table cellpadding="0" cellspacing="0">
    <tr>
        <td class="tituloContenidoAdmin">GESTIONAR ARTICULOS: </td>
    </tr>
</table>

<form name="formBuscador" method="POST" action="index?accion=articuloAdmin">
    <table width="200" cellpadding="0" cellspacing="0" class="fondoBuscadorAdmin">
        <tr>
            <td>
                <div align="center" class="textoChico">
                    <div align="right">Buscar art&iacute;culos: </div>
                </div>
            </td>
            <td>
                <div align="center">
                    <input type="text" name="_buscar" class="inputBuscador"/>
                </div>
            </td>
            <td>&nbsp;</td>
            <td>
                <div align="center" class="textoChico">
                    <div align="right">Buscar por: </div>
                </div>
            </td>
            <td width="255">
                <select name="_filtro" onchange="">
                    <option value="0" <%=(filtro == 0?"selected":"")%>>Todos</option>
                    <option value="1" <%=(filtro == 1?"selected":"")%>>C&oacute;digo</option>
                    <option value="2" <%=(filtro == 2?"selected":"")%>>Nombre</option>
                    <option value="3" <%=(filtro == 3?"selected":"")%>>Descripci&oacute;n comercial</option>
                    <option value="4" <%=(filtro == 4?"selected":"")%>>Marca</option>
                    <option value="5" <%=(filtro == 5?"selected":"")%>>Categoria</option>
                </select>
            </td>
            <td>&nbsp;</td>
            <td>
                <div align="left">
                    <input name="_submitBuscar" type="submit" class="boton2" value="Buscar" />
                </div>
            </td>
        </tr>
    </table>
</form>
<br/>
<table cellpadding="0" cellspacing="0" class="fondoMicrositios">
    <tr class="fondoTituloAdmin">
        <td>C&oacute;digo:</td>
        <td width="50%">Nombre:</td>
        <td>Categor&iacute;a:</td>
        <td>Acci&oacute;n</td>
    </tr>
    <tr class="fondoCaracteristicaImpar">
        <td><span class="textoFilasAdmin">CA41322</span></td>
        <td width="50%" class="textoFilasAdmin">REPRODUCTOR DVD PORTABLE LG DVP-9821N</td>
        <td class="textoFilasAdmin">Electrodomesticos</td>
        <td class="accionArticulo"><a href="#">Modificar</a></td>
    </tr>
    <tr class="fondoCaracteristicaPar">
        <td class="fondoCaracteristicaPar"><span class="textoFilasAdmin">CA41322</span></td>
        <td width="50%" class="fondoCaracteristicaPar"><span class="textoFilasAdmin">REPRODUCTOR DVD PORTABLE LG DVP-9821N</span></td>
        <td class="fondoCaracteristicaPar"><span class="textoFilasAdmin">Electrodomesticos</span></td>
        <td class="accionArticulo"><a href="#">Modificar</a></td>
    </tr>
    <tr class="fondoCaracteristicaAdmin">
        <td class="fondoCaracteristicaAdmin">CA41322</td>
        <td width="50%" class="fondoCaracteristicaAdmin">REPRODUCTOR DVD PORTABLE LG DVP-9821N</td>
        <td class="fondoCaracteristicaAdmin">Electrodomesticos</td>
        <td class="accionArticulo"><a href="#">Modificar</a></td>
    </tr>
    </tr>
    <tr class="fondoCaracteristicaPar">
        <td class="fondoCaracteristicaPar"><span class="textoFilasAdmin">CA41322</span></td>
        <td width="50%" class="fondoCaracteristicaPar"><span class="textoFilasAdmin">REPRODUCTOR DVD PORTABLE LG DVP-9821N</span></td>
        <td class="fondoCaracteristicaPar"><span class="textoFilasAdmin">Electrodomesticos</span></td>
        <td class="accionArticulo"><a href="#">Modificar</a></td>
    </tr>
</table>
<table class="fondoArticuloComparar">
    <tr>
        <td class="separadorArticulo"></td>
    </tr>
    <tr>
        <td class="textoChico">(En rojo art&iacute;culos que NO tienen una categoria asignada)</td>
    </tr>
</table>
<br />
</div>
